package hn.sigit.model.hnd.ladmshadow;

import java.io.Serializable;
import javax.persistence.*;
@Entity(name="hn.sigit.model.hnd.ladmshadow.ExtArchive")
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="ExtArchive", schema="ladmshadow")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class ExtArchive implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	public ExtArchive() {
	}
	
	private long sID;
	private java.util.Date acceptance;
	private String data;
	private java.util.Date recordation;
	private java.util.Date submission;
	public Source source;
	
	
	@Id
	@Column(name="ID", nullable=false)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="shw_extarchive_id_gen")
	@SequenceGenerator(name="shw_extarchive_id_gen", sequenceName="shw_extarchive_id_seq", allocationSize=1)
	public long getsID() {
		return sID;
	}
	protected void setsID(long value) {
		this.sID = value;
	}
	@Transient
	public long getORMID() {
		return getsID();
	}

	@Column(name="Acceptance", nullable=true)
	public java.util.Date getAcceptance() {
		return acceptance;
	}
	public void setAcceptance(java.util.Date value) {
		this.acceptance = value;
	}
	
	@Column(name="Data", nullable=true, length=255)
	public String getData() {
		return data;
	}
	public void setData(String value) {
		this.data = value;
	}
	
	@Column(name="Recordation", nullable=true)
	public java.util.Date getRecordation() {
		return recordation;
	}
	public void setRecordation(java.util.Date value) {
		this.recordation = value;
	}
	
	@Column(name="Submission", nullable=true)
	public java.util.Date getSubmission() {
		return submission;
	}
	public void setSubmission(java.util.Date value) {
		this.submission = value;
	}
	
	@OneToOne(mappedBy="archive", targetEntity=Source.class, fetch=FetchType.LAZY)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK, org.hibernate.annotations.CascadeType.DELETE})	
	@org.hibernate.annotations.LazyToOne(value=org.hibernate.annotations.LazyToOneOption.NO_PROXY)	
	public Source getSource() {
		return source;
	}
	public void setSource(Source value) {
		this.source = value;
	}
	
	public String toString() {
		return String.valueOf(getsID());
	}
	
}
